import request from '@/utils/request'

// 查询装箱管理列表
export function listBox(query) {
  return request({
    url: '/system/box/list',
    method: 'get',
    params: query
  })
}

// 查询装箱管理详细
export function getBox(boxCode) {
  return request({
    url: '/system/box/' + boxCode,
    method: 'get'
  })
}

// 新增装箱管理
export function addBox(data) {
  return request({
    url: '/system/box',
    method: 'post',
    data: data
  })
}

// 修改装箱管理
export function updateBox(data) {
  return request({
    url: '/system/box',
    method: 'put',
    data: data
  })
}

// 删除装箱管理
export function delBox(boxCode) {
  return request({
    url: '/system/box/' + boxCode,
    method: 'delete'
  })
}

// 批量封箱
export function fxBox(boxCode,type) {
  return request({
    url: '/system/box/fxCkBox/' + boxCode+"/"+type,
    method: 'post'
  })
}

// 批量出库
export function ckBox(boxCode,data) {
  return request({
    url: '/system/box/ckBox/' + boxCode,
    method: 'post',
    data: data
  })
}
